#define _CRT_SECURE_NO_WARNINGS 1
#include "SList.h"

void SlistNotePrint(SLNote* phead)
{
	while (phead != NULL)
	{
		printf("%d->", phead->date);
		phead = phead->next;
	}
	printf("NULL\n");
}

void SlistNotePush(SLNote** pphead, SLDateType x)
{
	SLNote* newhead = (SLNote*)malloc(sizeof(SLNote));
	newhead->date = x;
	newhead->next = NULL;
	if (*pphead == NULL)
	{
		*pphead = newhead;
	}
	else
	{
		SLNote* tail = *pphead;
		while (tail->next != NULL)
		{
			tail = tail->next;
		}
		tail->next = newhead;
	}
}